# Copyright (C) 2005 Taylor L. Riché <riche@cs.utexas.edu>
#  
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without 
# modifications, as long as this notice is preserved.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#	$Id: Makefile.am 113 2005-08-10 19:11:51Z richetl $	
#

bin_PROGRAMS = llt

GRAMMAR = lagniappe.g

llt_SOURCES = Main.java $(GRAMMAR) $(ANTLR_GEN) PpfFeatures.java \
              PpfHeaderPrinter.java CppData.java CppMethods.java \
              CppIncludes.java PpfExits.java AGFactoryPrinter.java \
              PpaDecls.java PpaWirings.java Events.java antlr.jar
llt_LDFLAGS = --main=Main

AM_GCJFLAGS = -I$(srcdir)/antlr.jar -I$(srcdir)
ANTLR=$(GIJ) --jar $(srcdir)/antlr.jar

ANTLR_GEN = LltLexer.java LltLexerTokenTypes.java \
            LltParser.java LltParserTokenTypes.java \
            LltTreeParser.java LltTreeParserTokenTypes.java
ANTLR_GEN_TEXT = LltLexerTokenTypes.txt LltParserTokenTypes.txt \
                 LltTreeParserTokenTypes.txt

$(ANTLR_GEN): $(GRAMMAR)
	$(ANTLR) $<
	touch $(ANTLR_GEN)

CLEANFILES = $(ANTLR_GEN) $(ANTLR_GEN_TEXT) lpkg

Main.java : $(ANTLR_GEN)
